var bootbox_global;
var grid;
define([
    "jquery",
    "IO",
    "bootbox"
], function ($, IO, bootbox) {

    bootbox_global = bootbox;
    $(function () {


        var columns_select ={name_dataIndex :'name',value_dataIndex :'user_id'};
                 var  grid_select = new Select_Grid("/user/GetListPaging",$("#userselect"),columns_select,"rows=100000");

                         grid_select.Init(function(){



                         });


        $(".btn_sub").bind("click",function()
        {


            var form_name = get_form_name( $(this));
            //验证
            if(check_form_info_all(form_name) == false)
                return;

            //改变按钮状态
            $(this).html("提交中...");
            var btn = $(this);

            //发送请求
            ajax_request(form_name,"",function process_data(data){

                //操作成功
                AlertSuccess(bootbox,"添加成功",function(){

                   window.location.reload();


                });


            },function process_fail(data){

                //操作失败
                AlertError(bootbox,data.msg,function(){  btn.html("提交"); });



            });

        });


        //查询

    });


});